package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysAttendanceRecord;
import com.ruoyi.system.mapper.SysAttendanceRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysHomeworkExercisesMapper;
import com.ruoyi.system.domain.SysHomeworkExercises;
import com.ruoyi.system.service.ISysHomeworkExercisesService;

/**
 * 课后习题管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-21
 */
@Service
public class SysHomeworkExercisesServiceImpl extends ServiceImpl<SysHomeworkExercisesMapper, SysHomeworkExercises> implements ISysHomeworkExercisesService
{
    @Autowired
    private SysHomeworkExercisesMapper sysHomeworkExercisesMapper;

    /**
     * 查询课后习题管理
     * 
     * @param id 课后习题管理主键
     * @return 课后习题管理
     */
    @Override
    public SysHomeworkExercises selectSysHomeworkExercisesById(Long id)
    {
        return sysHomeworkExercisesMapper.selectSysHomeworkExercisesById(id);
    }

    /**
     * 查询课后习题管理列表
     * 
     * @param sysHomeworkExercises 课后习题管理
     * @return 课后习题管理
     */
    @Override
    public List<SysHomeworkExercises> selectSysHomeworkExercisesList(SysHomeworkExercises sysHomeworkExercises)
    {
        return sysHomeworkExercisesMapper.selectSysHomeworkExercisesList(sysHomeworkExercises);
    }

    /**
     * 新增课后习题管理
     * 
     * @param sysHomeworkExercises 课后习题管理
     * @return 结果
     */
    @Override
    public int insertSysHomeworkExercises(SysHomeworkExercises sysHomeworkExercises)
    {
        sysHomeworkExercises.setCreateTime(DateUtils.getNowDate());
        return sysHomeworkExercisesMapper.insertSysHomeworkExercises(sysHomeworkExercises);
    }

    /**
     * 修改课后习题管理
     * 
     * @param sysHomeworkExercises 课后习题管理
     * @return 结果
     */
    @Override
    public int updateSysHomeworkExercises(SysHomeworkExercises sysHomeworkExercises)
    {
        sysHomeworkExercises.setUpdateTime(DateUtils.getNowDate());
        return sysHomeworkExercisesMapper.updateSysHomeworkExercises(sysHomeworkExercises);
    }

    /**
     * 批量删除课后习题管理
     * 
     * @param ids 需要删除的课后习题管理主键
     * @return 结果
     */
    @Override
    public int deleteSysHomeworkExercisesByIds(Long[] ids)
    {
        return sysHomeworkExercisesMapper.deleteSysHomeworkExercisesByIds(ids);
    }

    /**
     * 删除课后习题管理信息
     * 
     * @param id 课后习题管理主键
     * @return 结果
     */
    @Override
    public int deleteSysHomeworkExercisesById(Long id)
    {
        return sysHomeworkExercisesMapper.deleteSysHomeworkExercisesById(id);
    }
}
